package com.sgb.kjwl.viewmodel.transport;

import androidx.databinding.ObservableField;
import android.util.Log;

import com.sgb.kjwl.repository.TransportRepertory;
import com.sgb.kjwl.view.ui.activity.transport.GoodsInfoManageSearchActivity3;
import com.swgk.core.base.BaseViewModel;

import java.util.ArrayList;
import java.util.List;

public class GoodsInfoManagerSearchModel3 extends BaseViewModel {

    public ObservableField<String> searchContent = new ObservableField<>("");
    private GoodsInfoManageSearchActivity3 activity;
    private TransportRepertory repertory;

    public GoodsInfoManagerSearchModel3(GoodsInfoManageSearchActivity3 activity3, TransportRepertory repertory1){
        this.activity = activity3;
        this.repertory = repertory1;
    }

    public void getSearchHistoryListData(){
        List<String> list = new ArrayList<>();

        for(int i=0;i<10;i++){
            if(i % 2 == 0){
                list.add("车型_高栏_"+i);
            }else{
                list.add("发车时间为上午"+i+"点");
            }
        }
        activity.getSearchHistoryData(list);
    }

    public void search(){
        Log.v("search=",searchContent.get().toString());
    }

}
